﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "博客";
}
@model RssApp.Models.BlogViewModel
@section Style{
    <style type="text/css">
        .list-group{border:none;}
        .list-group .list-group-item{border-left:none;border-right:none;border-bottom:none;}
        .list-group .list-group-item:first-child{border-top:none;}
    </style>
    }
@if (Model != null)
{
    <div class="row">
        <div class="page-header">
            <h2>@(Model.author.Name)的博客<small>（技术部）</small></h2>
        </div>
        <ol class="breadcrumb">
            <li><a href="#">首页</a></li>
            <li class="active">博客园</li>
        </ol>
        <div style="margin:20px auto;">
            <div class="col-sm-6 col-md-4">
                <div class="thumbnail">
                    <img data-src="holder.js/100%x200" alt="100%x200" src="" data-holder-rendered="true" style="height: 200px; width: 100%; display: block;">
                    <div class="caption">
                        <h3>@Model.author.Name</h3>
                        <p>@Model.author.Slogan</p>
                    </div>
                </div>
            </div>
            <div class="col-sm-6 col-md-4">
                <p>作者简介</p>
            </div>
            <div class="clearfix"></div>
            <hr />
            <div class="col-sm-12 co-md-8">

                <!-- Nav tabs -->
                <ul class="nav nav-tabs co-md-8" role="tablist">
                    @{
                        int j = 0;
                        foreach (var item in Model.blog)
                        {
                            <li role="presentation" class="@(j==0? "active":string.Empty)"><a href="#@item.Rss.Type" aria-controls="home" role="tab" data-toggle="tab">@item.Rss.Blog</a></li>
                            j++;
                        }
                    }
                </ul>

                <!-- Tab panes -->
                <div class="tab-content co-md-8">

                    @{ int i = 0;
                        foreach (var item in Model.blog)
                        {
                            <div role="tabpanel" class="tab-pane @(i==0? "active":string.Empty)" id="@item.Rss.Type">
                                <ul class="list-group">
                                    @foreach (var blog in item.Blogs)
                                    {
                                        <li class="list-group-item">
                                            <a href="@blog.Url" target="_blank" title="@blog.Title">@blog.Title</a>
                                        </li>
                                    }
                                </ul>
                            </div>
                            i++;
                        }
                    }
                </div>
            </div>
        </div>
    </div>
 }